package cn.tedu.controller;

import cn.tedu.service.RibbonService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/ribbon")
public class RibbonController {
    @Autowired
    RibbonService ribbonService;

    /**
     * 假设当前ribbon工程不具备说英文的能力，这次请求虽然到达了该ribbon的web应用, 无法单独处理功能
     * 想方法实现调用service-hi的功能
     */
    @RequestMapping("/hello")
    public String sayHello(String name) {
        return "Ribbon: " + ribbonService.sayHello(name);
    }
}
